<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="../system/components/xtree/xtree.css">
<link rel="stylesheet" type="text/css" href="../system/components/xclock/clock.css">
<link rel="stylesheet" type="text/css" href="../system/components/xcalendar/xcalendar.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Insert title here</title>
<style type="text/css">
body,html{
width:100%;
height:100%;
}
</style>
</head>
<body>
<input id='time'/>
<input type ="button" value ="setime" onclick="setTime()"/>
<input type ="button" value ="reime" onclick="clock.refreshTime()"/>
<div id="show" style ="width:100px;height:100px;">

</div>
<!-- 71px 和72px 圆心 -->
<!-- <img id="img" src="../system/images/clock.png"></img> -->
</body>
<script type="text/javascript">
var realPath = "<%=request.getContextPath()%>";
var realpath =realPath;
</script>
<script type="text/javascript" src="../system/util/sys.js"></script>
<script type="text/javascript" src="../system/third/jquery/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="../system/components/xtree/xtree.js"></script>
<script type="text/javascript" src="../system/components/dialog/dialog.js"></script>
<script type="text/javascript" src="../system/components/menu/menu.js"></script>
<script type="text/javascript" src="../system/components/xclock/clock.js"></script>
<script type="text/javascript" src="../system/components/xcalendar/xcalendar.js"></script>
<script>
var clock =new XClock();
clock.setPosition(300,300);
var dialog = new Dialog(window,"文件框");
dialog.setHeight("800px");
dialog.setWidth("1000px");
dialog.setPosition(450, 100);
var contentDiv = dialog.getContent();
var div =$("#show");
clock.setShowTimeFunc(function(){
	var date = this.date;
	div.text(date.toLocaleString()+"\n"+date.toDateString());
	
});
var calendar =new XCalendar();
//dialog.show();
function setTime(){
	var value =$("#time").val();
	clock.setTime(6,12,45);
}
var xtree=new XTree(contentDiv,{hasCheckBox:true,rootText:"计算机"});
var root = xtree.rootItem;
root.setUserObj({type:"main"});
root.setItemIconByImg("/system/images/mycomputer.ico");
xtree.setQueryUrl("query.do");
xtree.setWidth(300);
xtree.setHeight("100%");
var arr=[{caption:"",func:""}];
var arr= {123:function(){
	console.log(11111);
	},
					3  :function(){},
					45 :function(){},
					"--" :null,
					33 :function(){}
					}
var menu =new Menu (window,120,30,arr);
xtree.setOnContextMenu(function(item){
	menu.createOnCursor();
});
</script>
</html>